/*!
\copyright  Copyright (c) 2022 Qualcomm Technologies International, Ltd.\n
            All Rights Reserved.\n
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\version    
\file        google_finder_sync.h
\brief      Header file of Google Finder Sync component
*/
#ifndef GOOGLE_FINDER_SYNC_H
#define GOOGLE_FINDER_SYNC_H

#ifdef INCLUDE_GOOGLE_FINDER
#include <marshal_common.h>
#include <marshal.h>
#include <message.h>
#include <task_list.h>

#include "google_finder_private.h"

/*! Google Finder sync task data. */
typedef struct
{
    TaskData task;
} google_finder_sync_task_data_t;

/*! Component level visibility of Google Finder Sync Task Data */
extern google_finder_sync_task_data_t google_finder_sync;

#define googleFinderSync_GetTaskData() (&google_finder_sync)
#define googleFinderSync_GetTask() (&google_finder_sync.task)

typedef struct
{
    uint32 beacon_time;
} google_finder_beacon_time_sync_req_t;

typedef struct
{
    bool synced;
} google_finder_beacon_time_sync_cfm_t;

typedef struct
{
    bool unwanted_tracking_prot_mode;
} google_finder_set_unwanted_tracking_req_t;

typedef struct
{
    bool synced;
} google_finder_set_unwanted_tracking_cfm_t;

/*! Create base list of marshal types google finder will use. */
#define MARSHAL_TYPES_TABLE_GOOGLE_FINDER_SYNC(ENTRY) \
    ENTRY(google_finder_beacon_time_sync_req_t) \
    ENTRY(google_finder_beacon_time_sync_cfm_t) \
    ENTRY(google_finder_set_unwanted_tracking_req_t) \
    ENTRY(google_finder_set_unwanted_tracking_cfm_t)

/*! X-Macro generate enumeration of all marshal types */
#define EXPAND_AS_ENUMERATION(type) MARSHAL_TYPE(type),

enum MARSHAL_TYPES_GOOGLE_FINDER_SYNC
{
    /*! common types must be placed at the start of the enum */
    DUMMY_GOOGLE_FINDER_SYNC = NUMBER_OF_COMMON_MARSHAL_OBJECT_TYPES-1,
    /*! now expand the marshal types specific to this component. */
    MARSHAL_TYPES_TABLE_GOOGLE_FINDER_SYNC(EXPAND_AS_ENUMERATION)
    NUMBER_OF_MARSHAL_OBJECT_TYPES
};
#undef EXPAND_AS_ENUMERATION

/*! Make the array of all message marshal descriptors available. */
extern const marshal_type_descriptor_t * const google_finder_sync_marshal_type_descriptors[];

#endif /* INCLUDE_GOOGLE_FINDER */
#endif /* GOOGLE_FINDER_SYNC_H */
